<!DOCTYPE html>
<html xmlns:th="www.thymeleaf.org">
<head>
<meta charset="UTF-8" />
<title>ORDER MANAGEMENT</title>
<link rel="stylesheet" href="../../css/bootstrap/bootstrap.css"
	th:href="@{/css/bootstrap/bootstrap.css}" />
<style>
@font-face {
	font-family: 'Glyphicons Halflings';
	src: url('../fonts/glyphicons-halflings-regular.eot');
	src: url('../fonts/glyphicons-halflings-regular.eot?#iefix')
		format('embedded-opentype'),
		url('../fonts/glyphicons-halflings-regular.woff') format('woff'),
		url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),
		url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular')
		format('svg');
}
</style>
</head>
<body>
	<header></header>
	<nav class="navbar navbar-inverse">
		<div class="container-fluid">
			<div class="col-md-offset-1">
				<ul class="nav navbar-nav">
					<li><a>HOME</a></li>
					<li><a href="#">RESTAURANT</a></li>
					<li><a th:href="@{/admin/list}">ADMIN</a></li>
					<li><a href="@{/toorder/list}">ORDER</a></li>
				</ul>
				<ul class="nav navbar-nav navbar-right">
					<li><a href="#"><span class="glyphicon glyphicon-search"></span>Sign
							Up</a></li>
					<li><a th:href="@{/j_spring_security_logout}"><span
							class="glyphicon glyphicon-log-out"></span>Logout</a></li>
				</ul>
			</div>
		</div>
	</nav>
	<section>
		<article class="container col-sm-10 col-sm-offset-1">
			<ol class="breadcrumb">
				<li><a th:href="@{/adminaccount/home}">Home</a></li>
				<li><a th:href="@{/toorder/list}">Order Bill</a></li>
				<li class="active">Search</li>
			</ol>
			<div class="panel panel-success">
				<div class="panel-heading">ORDER BILL MANAGEMENT</div>
				<div class="panel-body">
					<form method="post" th:action="@{/toorder/search}"
						class="form-horizontal container col-sm-10 col-sm-offset-1">
						<div class="form-group">
							<label class="control-label col-sm-3" for="orderCode">Order
								Code:</label>
							<div class="col-sm-9">
								<input type="text" class="form-control" id="orderCode"
									name="orderCode" th:value="${order.orderCode}"
									placeholder="Enter Order Code" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="orderCode">User
								Name:</label>
							<div class="col-sm-9">
								<input type="text" class="form-control" id="username"
									name="username" th:value="${order.username}"
									placeholder="Enter username" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="email">Email</label>
							<div class="col-sm-9">
								<input type="email" class="form-control" id="email" name="email"
									th:value="${order.email}" placeholder="Enter Email" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="wardName">Ward
								Name: </label>
							<div class="col-sm-9">
								<input type="text" id="wardName" name="wardName"
									class="form-control" th:value="${order.wardName}"
									placeholder="Enter ward name" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="phoneNumber">Phone
								Number:</label>
							<div class="col-sm-9">
								<input type="text" id="phoneNumber" name="phoneNumber"
									class="form-control" th:value="${order.phoneNumber}"
									placeholder="Enter phone number" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="restaurantName">Restaurant
								Name:</label>
							<div class="col-sm-9">
								<input type="text" id="restaurantName" name="restaurantName"
									class="form-control" th:value="${order.restaurantName}"
									placeholder="Enter Restaurant Name" />
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-3 col-sm-3">
								<button type="submit"
									class="btn btn-primary glyphicon glyphicon-search">Search</button>
							</div>
							<div class="sm-offset-3 col-sm-3 pull-right">
								<button type="button"
									class="btn btn-primary glyphicon glyphicon-new-window">Download</button>
							</div>
						</div>
					</form>
					<div th:unless="${#lists.isEmpty(list)}">
						<table class="table table-hover">
							<thead>
								<tr>
									<th>Order Code</th>
									<th>Username</th>
									<th>Email</th>
									<th>Ward Name</th>
									<th>Phone Number</th>
									<th>Restaurant Name</th>
									<th>Total Price</th>
									<th>Create Time</th>
								</tr>
							</thead>
							<tbody>
								<tr th:each="li : ${list}">
									<td><a
										th:href="@{/toorder/detail(orderCode=${li.orderCode})}"
										th:text="${li.orderCode}"></a></td>
									<td th:text="${li.username}"></td>
									<td th:text="${li.email}"></td>
									<td th:text="${li.wardName}"></td>
									<td th:text="${li.phoneNumber}"></td>
									<td th:text="${li.restaurantName}"></td>
									<td th:text="${li.totalPrice}"></td>
									<td th:text="${li.createTime}"></td>
								</tr>
							</tbody>
						</table>
						<!-- <div class="pull-right">
							<ul class="pagination">
								<th:block th:each="pa : ${listInt}">
									<li><a href="#" th:text="${pa}"></a></li>
								</th:block>
							</ul>
						</div> -->
					</div>
				</div>
			</div>
		</article>
	</section>
	<footer class="container col-sm-12">
		<ol class="breadcrumb text-center">
			<li class="active"><p>@copyright - University Of Information
					Technology - Spring + hibernate + css3 + html5</p></li>
		</ol>
	</footer>
</body>
</html>